package main

import "log"

func main() {
	var i, n, m, times, result int64
	times = 1000000
	for i = 0; i <= times; i++ {
		for n = 0; n <= times; n++ {
			for m = 0; m <= times; m++ {
				result += m
			}
			result += n
		}
		result += i
	}

	log.Println(i)
}
